﻿@using ECG.Utility
@using ECG.WebUI.CustomHelpers
@model List<ECG.Common.ProductByCateTopListDto>
@{
    if (Model.Any())
    {
    <ul class="pp1-list-p clearfix">
        @foreach (var item in Model)
        {
            var pDetailLink = Url.Action("Index", "ProductDetail", new { productId = item.Id, productName = StringUtil.RemoveSpecialCharactersVn(item.Name) });
            
            <li>
                <a href="@pDetailLink" title="@item.Name">
                    <div class="pp1-img">
                        <img src="@item.ImagePath.ImagePathThumb(150, 150)" width="150" height="150" alt="@item.Name" />
                    </div>
                    <div class="pp1-name">
                        <h2>@item.Name</h2>
                    </div>
                    @if (item.PromotionPrice > 0)
                    {
                        <div class="pp1-price-thro">@item.Price.ToString("##,###,###")đ</div>
                        <div class="pp1-price">@item.PromotionPrice.ToString("##,###,###")đ</div>
                    }
                    else
                    {
                        <div class="pp1-price">@item.Price.ToString("##,###,###")đ</div>
                    }
                </a>
            </li>
        }
    </ul>
    }
}